#include "IwGx.h"
#include "IwUI.h"
#include "IwUIDailyReport.h"

class CController : public CIwUIController
{
public:
	IW_MANAGED_DECLARE(CController)
    CController()
    {
		 IW_UI_CREATE_VIEW_SLOT1(this, "CController", CController, OnClickQuit,
            CIwUIElement*)
        IW_UI_CREATE_VIEW_SLOT2(this, "CController", CController, OnRadioLanguage,
            CIwUIElement* , int16 )
    }

private:
    void OnRadioLanguage(CIwUIElement*, int16 mode)
    {
        if (mode >= 0 && mode < GetApp()-> NUM_LANGUAGES)
        {
			GetApp()-> g_Localise = (CIwUIDailyReport::LocaliseLanguages) mode;
        }
    }

    void OnClickQuit(CIwUIElement*)
    {
        s3eDeviceRequestQuit();
    }
};
IW_MANAGED_IMPLEMENT_FACTORY(CController)